#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
class QAction;
class QMenu;
class QTabWidget;
QT_END_NAMESPACE

class Project;
class TextureWidget;

#include "ui_CharacterViewWidget.h"
#include "ui_EditFontDialog.h"

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow();

protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void newFile();
    void open();
    bool save();
    bool saveAs();
    void about();
    void documentWasModified();
    void exportToABC();
    void editFont();

    void removeCurrentSelectedRows();
    void addACharacter();
    void addACustomGlyph();
    void editCustomGlyph();

private:
    void createActions();
    void createMenus();
    void createToolBars();
    void createDockWindows();
    void createStatusBar();
    void readSettings();
    void writeSettings();
    bool maybeSave();
    void loadFile(const QString &fileName);
    bool saveFile(const QString &fileName);
    void setCurrentFile(const QString &fileName);
    QString strippedName(const QString &fullFileName);

    QString currentFile;

    QMenu *fileMenu;
    QMenu *editMenu;
    QMenu *toolsMenu;
    QMenu *helpMenu;
    QToolBar *fileToolBar;
    QAction *newAct;
    QAction *openAct;
    QAction *saveAct;
    QAction *saveAsAct;
    QAction *exitAct;
    QAction *aboutAct;
    QAction *exportToABCAct;

    Project * project;
    TextureWidget * textureWidget;
    Ui::CharacterViewWidget characterViewWidget;
    Ui::EditFontDialog editFontDialog;
};

#endif
